package com.huanri.date;

import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * @author Nemo
 * @date 2012-9-12 at MyCode
 */
public class GetPersonalDate {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		Date date = new Date();
		String temp = DateFormat.getDateInstance().format(date);
		String s = new SimpleDateFormat("yyyy-MM-dd").format(date);
		String s2 = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss").format(date);
		System.out.println(date.toString());
		System.out.println(temp);
		System.out.println(s);
		System.out.println(s2);
	}

}
